package com.wyfan.scaffold.common.config.db;

import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.boot.context.properties.NestedConfigurationProperty;
import org.springframework.context.annotation.Configuration;

/**
 * mysql 配置类
 * 多数据源添加配置MysqlProperties 属性，并在数据源配置类中对应配置好dbName（即 MysqlProperties 属性名）
 */
@Data
@Configuration
@ConfigurationProperties(prefix = "spring.datasource")
public class MysqlConfig {

    // dbName
    @NestedConfigurationProperty
    public MysqlProperties druid;

}


